#Teste Basico de Check do Wordpress
#
#Bruno Macagnani - 25/04/2012

URL="https://blogdojuca.uol.com.br/wp-admin/"
TMPFILE="/tmp/check_wordpress"
PASSWD="admin:6pa4b5YMObwj"
DATE=`date`

curl -L -u admin:6pa4b5YMObwj https://blogdojuca.uol.com.br/wp-admin/ -k --anyauth > $TMPFILE 2> /dev/null
 if [ "$?" -ne "0" ];
then
    echo "Nao foi possivel conectar em  ${URL}"
    exit 2
fi
RES=`grep -i "Kfouri" ${TMPFILE}`
if [ "$?" -ne "0" ];
then
    echo "Blog fora do Ar${URL}"
    exit 1
fi
echo "${DATE} Blog OK" 1>>/export/logs/check_wordpress.txt
exit 0;
